package com.example.ksnacosprovider.Service;

import com.example.ksnacosprovider.dao.CustomerMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pojo.Customer;
import tools.Page;

import java.util.List;

@Service
public class CustomerServiceImpl implements CustomerService {

    @Autowired
    private CustomerMapper customerMapper;


    @Override
    public boolean InsertCustomer(Customer customer) {
        return customerMapper.InsertCustomer(customer);
    }

    @Override
    public boolean DelCustomer(int id) {
        return customerMapper.DelCustomer(id);
    }

    @Override
    public boolean UpdateCustomer(Customer customer) {
        return customerMapper.UpdateCustomer(customer);
    }

    @Override
    public List<Customer> SelCustomer(String customerNumber, String customerName,Page page) {
        return customerMapper.SelCustomer(customerNumber,customerName,page);
    }

    @Override
    public int SelectTotle(String customerNumber,String customerName) {
        return customerMapper.SelectTotle(customerNumber,customerName);
    }
}
